package com.yyds.yygh.msm.utils;


import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class ConstantPropertiesUtils implements InitializingBean {
    @Value("${zhenzi.sms.apiUrl}")
    private String apiUrl;
    @Value("${zhenzi.sms.appId}")
    private String appId;
    @Value("${zhenzi.sms.appSecret}")
    private String appSecret;
    @Value("${zhenzi.sms.templateId}")
    private String templateId;

    //公有静态成员变量
    public static String API_URL;
    public static String APP_ID;
    public static String APP_SECRET;
    public static String TEMPLATED_ID;

    @Override
    public void afterPropertiesSet() throws Exception {
        API_URL=apiUrl;
        APP_ID=appId;
        APP_SECRET=appSecret;
        TEMPLATED_ID=templateId;
    }
}
